home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / BAT-OVER.HLP < prev    next >
Text File  |  1987-04-05  |  2KB  |  38 lines

  1.                       Overview of the DOS Batch Facility
  2.  
  3. The DOS Batch Facility lets you execute many commands with just one command.
  4. The commands to be executed are stored in a "Batch File."  A batch file may
  5. contain DOS commands, other batch file names, program names and Batch
  6. Subcommands.  Batch files may have any valid filename but must have .BAT as the
  7. filename extension.  To execute a batch file, enter the filename of the batch
  8. file.  DOS will execute the commands, one by one, as if they were entered from
  9. the keyboard.  Batch files are a convenient and time-saving feature.  They
  10. provide a way to automate the execution of a series of commands.
  11.  
  12. DOS has a special set of internal (resident in memory) commands that can be used
  13. in batch files.  These are called "Batch Subcommands."  They give the Batch
  14. Facility added function by allowing conditional execution of commands, repeated
  15. execution of commands and other operations which broaden the batch file's
  16. capability.
  17.  
  18. Here is a simple batch file named STARTUP.BAT.  It contains two commands:
  19.  
  20.     CHKDSK B:
  21.     LOTUS
  22.  
  23. This batch file is started by entering its name, STARTUP. DOS executes the first
  24. line, CHKDSK B: and then the next line, LOTUS.
  25.  
  26. There is a special kind of batch file called AUTOEXEC.BAT.  Each time DOS is
  27. started, it looks for an AUTOEXEC.BAT file (in the root directory) and, if
  28. found, executes it.  This is a handy way to execute a number of commands each
  29. time the computer is started.
  30.  
  31. You can terminate a batch file during its execution by holding down the CTRL key
  32. and then pressing the BREAK key.  DOS will then respond with:
  33.  
  34.     Terminate batch job (Y/N)?
  35.  
  36.     If you press Y, DOS will terminate the batch file.  If you press N, DOS will
  37.     continue execution.
  38.